etcd节点启动失败
etcd节点失败信息
确认证书没有问题,指定的master也没有正常启动,问题显示是环境配置文件没有加载,使用journalctl -xe 查看信息如下:
[root@iZbp1984wh47aud21gdhm8Z etcd-v3.2.12-linux-amd64]# journalctl -xe
4月 03 11:42:35 iZbp1984wh47aud21gdhm8Z etcd[32131]: recognized environment variable ETCD_DATA_DIR, but unused: shadowed by corresponding flag
4月 03 11:42:35 iZbp1984wh47aud21gdhm8Z etcd[32131]: recognized environment variable ETCD_LISTEN_PEER_URLS, but unused: shadowed by corresponding flag
4月 03 11:42:35 iZbp1984wh47aud21gdhm8Z etcd[32131]: recognized environment variable ETCD_LISTEN_CLIENT_URLS, but unused: shadowed by corresponding flag
4月 03 11:42:35 iZbp1984wh47aud21gdhm8Z etcd[32131]: recognized environment variable ETCD_INITIAL_ADVERTISE_PEER_URLS, but unused: shadowed by corresponding flag
4月 03 11:42:35 iZbp1984wh47aud21gdhm8Z etcd[32131]: recognized environment variable ETCD_INITIAL_CLUSTER_TOKEN, but unused: shadowed by corresponding flag
4月 03 11:42:35 iZbp1984wh47aud21gdhm8Z etcd[32131]: recognized environment variable ETCD_ADVERTISE_CLIENT_URLS, but unused: shadowed by corresponding flag
4月 03 11:42:35 iZbp1984wh47aud21gdhm8Z etcd[32131]: etcd Version: 3.2.12
4月 03 11:42:35 iZbp1984wh47aud21gdhm8Z etcd[32131]: Git SHA: b19dae0
4月 03 11:42:35 iZbp1984wh47aud21gdhm8Z etcd[32131]: Go Version: go1.8.5
4月 03 11:42:35 iZbp1984wh47aud21gdhm8Z etcd[32131]: Go OS/Arch: linux/amd64
4月 03 11:42:35 iZbp1984wh47aud21gdhm8Z etcd[32131]: setting maximum number of CPUs to 1, total number of available CPUs is 1
4月 03 11:42:35 iZbp1984wh47aud21gdhm8Z etcd[32131]: the server is already initialized as member before, starting as etcd member...
4月 03 11:42:35 iZbp1984wh47aud21gdhm8Z etcd[32131]: peerTLS: cert = /etc/kubernetes/ssl/kubernetes.pem, key = /etc/kubernetes/ssl/kubernetes-key.pem, ca = , trusted-ca = /etc/kubernetes/ssl/ca.pem, client-cert-auth = false
4月 03 11:42:35 iZbp1984wh47aud21gdhm8Z etcd[32131]: listening for peers on https://10.x.70.6:2380
4月 03 11:42:35 iZbp1984wh47aud21gdhm8Z etcd[32131]: The scheme of client url http://127.0.0.1:2379 is HTTP while peer key/cert files are presented. Ignored key/cert files.
4月 03 11:42:35 iZbp1984wh47aud21gdhm8Z etcd[32131]: listening for client requests on 127.0.0.1:2379
4月 03 11:42:35 iZbp1984wh47aud21gdhm8Z etcd[32131]: listening for client requests on 10.27.70.6:2379
4月 03 11:42:35 iZbp1984wh47aud21gdhm8Z etcd[32131]: --initial-cluster must include infra1=https://10.27.70.6:2380 given --initial-advertise-peer-urls=https://10.x.70.6:2380
4月 03 11:42:35 iZbp1984wh47aud21gdhm8Z systemd[1]: etcd.service: main process exited, code=exited, status=1/FAILURE
4月 03 11:42:35 iZbp1984wh47aud21gdhm8Z systemd[1]: Failed to start Etcd Server.
解决方案
通过比对与master节点的配置文件发现ETCD_NAME,节点与master的名称一致,修改节点名称之后systemctl daemon-reload systemctl start etcd 可以正常启动